.class public Les/cf;
.super Ljava/lang/Object;
.source "DiskScanner.java"


# static fields
.field private static final o:Ljava/lang/String; = "cf"


# instance fields
.field private a:I

.field private b:J

.field private volatile c:Z

.field private volatile d:Z

.field private final e:Ljava/util/concurrent/BlockingQueue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/BlockingQueue<",
            "Ljava/io/File;",
            ">;"
        }
    .end annotation
.end field

.field private final f:Ljava/util/concurrent/ExecutorService;

.field private final g:Ljava/util/concurrent/atomic/AtomicInteger;

.field private final h:Les/yu;

.field private final i:Ljava/util/concurrent/CyclicBarrier;

.field private final j:Ljava/util/concurrent/atomic/AtomicInteger;

.field private final k:Ljava/util/concurrent/atomic/AtomicInteger;

.field private final l:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Les/ef;",
            ">;"
        }
    .end annotation
.end field

.field private final m:Les/if;

.field private final n:Ljava/lang/Runnable;


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method public constructor <init>(Ljava/lang/String;)V
    .locals 3

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/16 v0, 0xa

    .line 2
    iput v0, p0, Les/cf;->a:I

    .line 3
    new-instance v1, Les/cf$a;

    invoke-direct {v1, p0}, Les/cf$a;-><init>(Les/cf;)V

    iput-object v1, p0, Les/cf;->n:Ljava/lang/Runnable;

    .line 4
    new-instance v1, Ljava/util/concurrent/CopyOnWriteArrayList;

    invoke-direct {v1}, Ljava/util/concurrent/CopyOnWriteArrayList;-><init>()V

    iput-object v1, p0, Les/cf;->l:Ljava/util/List;

    .line 5
    invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Runtime;->availableProcessors()I

    move-result v1

    mul-int/lit8 v1, v1, 0x2

    if-le v1, v0, :cond_0

    goto :goto_0

    :cond_0
    move v0, v1

    .line 6
    :goto_0
    iput v0, p0, Les/cf;->a:I

    .line 7
    new-instance v0, Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-direct {v0}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V

    iput-object v0, p0, Les/cf;->e:Ljava/util/concurrent/BlockingQueue;

    .line 8
    new-instance v0, Ljava/util/concurrent/atomic/AtomicInteger;

    const/4 v1, 0x0

    invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>(I)V

    iput-object v0, p0, Les/cf;->g:Ljava/util/concurrent/atomic/AtomicInteger;

    .line 9
    new-instance v0, Les/yu;

    invoke-direct {v0}, Les/yu;-><init>()V

    iput-object v0, p0, Les/cf;->h:Les/yu;

    .line 10
    new-instance v0, Ljava/util/concurrent/CyclicBarrier;

    iget v2, p0, Les/cf;->a:I

    invoke-direct {v0, v2}, Ljava/util/concurrent/CyclicBarrier;-><init>(I)V

    iput-object v0, p0, Les/cf;->i:Ljava/util/concurrent/CyclicBarrier;

    .line 11
    new-instance v0, Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>(I)V

    iput-object v0, p0, Les/cf;->j:Ljava/util/concurrent/atomic/AtomicInteger;

    .line 12
    new-instance v0, Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>(I)V

    iput-object v0, p0, Les/cf;->k:Ljava/util/concurrent/atomic/AtomicInteger;

    .line 13
    invoke-direct {p0, p1}, Les/cf;->a(Ljava/lang/String;)Les/if;

    move-result-object p1

    iput-object p1, p0, Les/cf;->m:Les/if;

    .line 14
    iget p1, p0, Les/cf;->a:I

    new-instance v0, Les/av;

    const-string v1, "Disk Scanner"

    invoke-direct {v0, v1}, Les/av;-><init>(Ljava/lang/String;)V

    invoke-static {p1, v0}, Ljava/util/concurrent/Executors;->newFixedThreadPool(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;

    move-result-object p1

    iput-object p1, p0, Les/cf;->f:Ljava/util/concurrent/ExecutorService;

    return-void
.end method

.method private a(Ljava/lang/String;)Les/if;
    .locals 1

    .line 4
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->D1(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 5
    new-instance p1, Les/pf;

    invoke-direct {p1}, Les/pf;-><init>()V

    return-object p1

    .line 6
    :cond_0
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->v1(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_4

    invoke-static {p1}, Lcom/estrongs/android/util/h0;->Q1(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    goto :goto_0

    .line 7
    :cond_1
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->z2(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 8
    new-instance p1, Les/sf;

    invoke-direct {p1}, Les/sf;-><init>()V

    return-object p1

    .line 9
    :cond_2
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->Q0(Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_3

    .line 10
    new-instance p1, Les/hf;

    invoke-direct {p1}, Les/hf;-><init>()V

    return-object p1

    .line 11
    :cond_3
    new-instance p1, Les/mf;

    invoke-direct {p1}, Les/mf;-><init>()V

    return-object p1

    .line 12
    :cond_4
    :goto_0
    new-instance p1, Les/of;

    invoke-direct {p1}, Les/of;-><init>()V

    return-object p1
.end method

.method static synthetic a(Les/cf;)Ljava/util/concurrent/CyclicBarrier;
    .locals 0

    .line 1
    iget-object p0, p0, Les/cf;->i:Ljava/util/concurrent/CyclicBarrier;

    return-object p0
.end method

.method static synthetic a(Les/cf;Ljava/io/File;)V
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/InterruptedException;
        }
    .end annotation

    .line 3
    invoke-direct {p0, p1}, Les/cf;->a(Ljava/io/File;)V

    return-void
.end method

.method private a(Ljava/io/File;)V
    .locals 16
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/InterruptedException;
        }
    .end annotation

    move-object/from16 v0, p0

    .line 17
    iget-object v1, v0, Les/cf;->k:Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicInteger;->incrementAndGet()I

    .line 18
    invoke-virtual/range {p1 .. p1}, Ljava/io/File;->listFiles()[Ljava/io/File;

    move-result-object v1

    if-nez v1, :cond_0

    return-void

    .line 19
    :cond_0
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual/range {p1 .. p1}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, "/"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    .line 20
    array-length v2, v1

    if-nez v2, :cond_2

    .line 21
    new-instance v1, Les/we;

    invoke-direct {v1, v5}, Les/we;-><init>(Ljava/lang/String;)V

    .line 22
    iget-object v2, v0, Les/cf;->l:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_1

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Les/ef;

    .line 23
    invoke-interface {v3, v1}, Les/ef;->a(Les/we;)V

    goto :goto_0

    :cond_1
    return-void

    :cond_2
    const-wide/16 v6, 0x0

    .line 24
    array-length v2, v1

    new-array v2, v2, [Ljava/io/File;

    .line 25
    array-length v4, v1

    new-array v4, v4, [Ljava/io/File;

    .line 26
    array-length v8, v1

    move-wide v10, v6

    const/4 v6, 0x0

    const/4 v7, 0x0

    const/4 v12, 0x0

    :goto_1
    if-ge v6, v8, :cond_7

    aget-object v13, v1, v6

    .line 27
    invoke-direct/range {p0 .. p0}, Les/cf;->d()Z

    move-result v14

    if-eqz v14, :cond_3

    goto/16 :goto_3

    .line 28
    :cond_3
    invoke-virtual {v13}, Ljava/io/File;->isDirectory()Z

    move-result v14

    const-string v15, "ignore: "

    if-eqz v14, :cond_5

    .line 29
    iget-object v14, v0, Les/cf;->h:Les/yu;

    invoke-virtual {v13}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v14, v9}, Les/yu;->a(Ljava/lang/String;)Z

    move-result v9

    if-eqz v9, :cond_4

    .line 30
    sget-object v9, Les/cf;->o:Ljava/lang/String;

    new-instance v14, Ljava/lang/StringBuilder;

    invoke-direct {v14}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v13}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v14, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v14}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-static {v9, v13}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_2

    :cond_4
    add-int/lit8 v9, v7, 0x1

    .line 31
    aput-object v13, v2, v7

    .line 32
    iget-object v7, v0, Les/cf;->g:Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-virtual {v7}, Ljava/util/concurrent/atomic/AtomicInteger;->incrementAndGet()I

    .line 33
    iget-object v7, v0, Les/cf;->e:Ljava/util/concurrent/BlockingQueue;

    invoke-interface {v7, v13}, Ljava/util/concurrent/BlockingQueue;->put(Ljava/lang/Object;)V

    move v7, v9

    goto :goto_2

    .line 34
    :cond_5
    iget-object v9, v0, Les/cf;->j:Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-virtual {v9}, Ljava/util/concurrent/atomic/AtomicInteger;->incrementAndGet()I

    .line 35
    iget-object v9, v0, Les/cf;->h:Les/yu;

    invoke-virtual {v13}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v14

    invoke-virtual {v9, v14}, Les/yu;->a(Ljava/lang/String;)Z

    move-result v9

    if-eqz v9, :cond_6

    .line 36
    sget-object v9, Les/cf;->o:Ljava/lang/String;

    new-instance v14, Ljava/lang/StringBuilder;

    invoke-direct {v14}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v13}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v14, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v14}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-static {v9, v13}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_2

    :cond_6
    add-int/lit8 v9, v12, 0x1

    .line 37
    aput-object v13, v4, v12

    .line 38
    invoke-virtual {v13}, Ljava/io/File;->length()J

    move-result-wide v12

    add-long/2addr v10, v12

    move v12, v9

    :goto_2
    add-int/lit8 v6, v6, 0x1

    goto :goto_1

    .line 39
    :cond_7
    :goto_3
    new-array v6, v7, [Les/cg;

    const/4 v1, 0x0

    :goto_4
    if-ge v1, v7, :cond_8

    .line 40
    new-instance v8, Les/cg;

    new-instance v9, Ljava/lang/StringBuilder;

    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

    aget-object v13, v2, v1

    invoke-virtual {v13}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v9, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v9, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Les/cg;-><init>(Ljava/lang/String;)V

    aput-object v8, v6, v1

    add-int/lit8 v1, v1, 0x1

    goto :goto_4

    .line 41
    :cond_8
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1, v12}, Ljava/util/ArrayList;-><init>(I)V

    const/4 v9, 0x0

    :goto_5
    if-ge v9, v12, :cond_a

    .line 42
    iget-object v2, v0, Les/cf;->m:Les/if;

    aget-object v3, v4, v9

    invoke-virtual {v2, v3}, Les/if;->a(Ljava/io/File;)Les/bg;

    move-result-object v2

    if-eqz v2, :cond_9

    .line 43
    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    :cond_9
    add-int/lit8 v9, v9, 0x1

    goto :goto_5

    .line 44
    :cond_a
    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v2

    new-array v7, v2, [Les/bg;

    .line 45
    invoke-virtual {v1}, Ljava/util/ArrayList;->isEmpty()Z

    move-result v2

    if-nez v2, :cond_b

    .line 46
    invoke-virtual {v1, v7}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    .line 47
    :cond_b
    new-instance v1, Les/we;

    move-object v4, v1

    move-wide v8, v10

    invoke-direct/range {v4 .. v9}, Les/we;-><init>(Ljava/lang/String;[Les/cg;[Les/bg;J)V

    .line 48
    iget-object v2, v0, Les/cf;->l:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_6
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_c

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Les/ef;

    .line 49
    invoke-interface {v3, v1}, Les/ef;->a(Les/we;)V

    goto :goto_6

    :cond_c
    return-void
.end method

.method static synthetic a(Les/cf;Z)Z
    .locals 0

    .line 2
    iput-boolean p1, p0, Les/cf;->c:Z

    return p1
.end method

.method private b(Ljava/util/List;)Ljava/util/List;
    .locals 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;)",
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .line 10
    sget-object v0, Les/cf;->o:Ljava/lang/String;

    const-string v1, "prepare for scanning..."

    invoke-static {v0, v1}, Lcom/estrongs/android/util/n;->a(Ljava/lang/String;Ljava/lang/String;)V

    if-eqz p1, :cond_5

    .line 11
    invoke-interface {p1}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_0

    goto/16 :goto_2

    .line 12
    :cond_0
    new-instance v0, Ljava/util/ArrayList;

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v1

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    .line 13
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_4

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    .line 14
    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_1

    goto :goto_0

    .line 15
    :cond_1
    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 16
    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v3

    if-nez v3, :cond_2

    .line 17
    sget-object v2, Les/cf;->o:Ljava/lang/String;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "no exist path!: "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v2, v1}, Lcom/estrongs/android/util/n;->c(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    :cond_2
    const-string v3, "/"

    .line 18
    invoke-virtual {v1, v3}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_3

    .line 19
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 20
    :cond_3
    :try_start_0
    iget-object v3, p0, Les/cf;->g:Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-virtual {v3}, Ljava/util/concurrent/atomic/AtomicInteger;->incrementAndGet()I

    .line 21
    iget-object v3, p0, Les/cf;->e:Ljava/util/concurrent/BlockingQueue;

    invoke-interface {v3, v2}, Ljava/util/concurrent/BlockingQueue;->put(Ljava/lang/Object;)V
    :try_end_0
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    move-exception v2

    .line 22
    invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_1

    :catch_1
    move-exception v2

    .line 23
    invoke-virtual {v2}, Ljava/lang/InterruptedException;->printStackTrace()V

    .line 24
    :goto_1
    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    :cond_4
    return-object v0

    .line 25
    :cond_5
    :goto_2
    invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;

    move-result-object p1

    return-object p1
.end method

.method static synthetic b(Les/cf;)Z
    .locals 0

    .line 1
    iget-boolean p0, p0, Les/cf;->c:Z

    return p0
.end method

.method static synthetic c()Ljava/lang/String;
    .locals 1

    .line 2
    sget-object v0, Les/cf;->o:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic c(Les/cf;)Z
    .locals 0

    .line 1
    invoke-direct {p0}, Les/cf;->e()Z

    move-result p0

    return p0
.end method

.method static synthetic d(Les/cf;)Ljava/util/concurrent/BlockingQueue;
    .locals 0

    .line 1
    iget-object p0, p0, Les/cf;->e:Ljava/util/concurrent/BlockingQueue;

    return-object p0
.end method

.method private d()Z
    .locals 3

    .line 2
    iget-boolean v0, p0, Les/cf;->d:Z

    const-string v1, "\u6536\u5230\u7ebf\u7a0b\u4e2d\u65ad\uff01\uff01"

    const/4 v2, 0x1

    if-eqz v0, :cond_0

    .line 3
    sget-object v0, Les/cf;->o:Ljava/lang/String;

    invoke-static {v0, v1}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    return v2

    .line 4
    :cond_0
    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Thread;->isInterrupted()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 5
    sget-object v0, Les/cf;->o:Ljava/lang/String;

    invoke-static {v0, v1}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 6
    iput-boolean v2, p0, Les/cf;->d:Z

    return v2

    :cond_1
    const/4 v0, 0x0

    return v0
.end method

.method static synthetic e(Les/cf;)Ljava/util/concurrent/atomic/AtomicInteger;
    .locals 0

    .line 1
    iget-object p0, p0, Les/cf;->g:Ljava/util/concurrent/atomic/AtomicInteger;

    return-object p0
.end method

.method private e()Z
    .locals 7

    .line 2
    iget-object v0, p0, Les/cf;->g:Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I

    move-result v0

    const/4 v1, 0x0

    if-nez v0, :cond_1

    iget-object v0, p0, Les/cf;->e:Ljava/util/concurrent/BlockingQueue;

    invoke-interface {v0}, Ljava/util/concurrent/BlockingQueue;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 3
    sget-object v0, Les/cf;->o:Ljava/lang/String;

    const-string v2, "check the scanner finished!"

    invoke-static {v0, v2}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 4
    iget-object v0, p0, Les/cf;->e:Ljava/util/concurrent/BlockingQueue;

    monitor-enter v0

    .line 5
    :try_start_0
    iget-boolean v2, p0, Les/cf;->c:Z

    const/4 v3, 0x1

    if-nez v2, :cond_0

    .line 6
    monitor-exit v0

    return v3

    .line 7
    :cond_0
    iput-boolean v1, p0, Les/cf;->c:Z

    .line 8
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 9
    sget-object v0, Les/cf;->o:Ljava/lang/String;

    const-string v1, "finish scan..."

    invoke-static {v0, v1}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 10
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    .line 11
    sget-object v2, Les/cf;->o:Ljava/lang/String;

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "\u76ee\u5f55\u5206\u6790\u8017\u65f6Expired: "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-wide v5, p0, Les/cf;->b:J

    sub-long/2addr v0, v5

    invoke-virtual {v4, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v0, " ms"

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v2, v0}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 12
    invoke-virtual {p0}, Les/cf;->b()V

    return v3

    :catchall_0
    move-exception v1

    .line 13
    :try_start_1
    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v1

    :cond_1
    return v1
.end method


# virtual methods
.method public a()V
    .locals 2

    .line 13
    sget-object v0, Les/cf;->o:Ljava/lang/String;

    const-string v1, "\u53d6\u6d88\u76ee\u5f55\u5206\u6790\uff01\uff01"

    invoke-static {v0, v1}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    const/4 v0, 0x1

    .line 14
    iput-boolean v0, p0, Les/cf;->d:Z

    .line 15
    invoke-virtual {p0}, Les/cf;->b()V

    return-void
.end method

.method public a(Les/ef;)V
    .locals 1

    if-eqz p1, :cond_0

    .line 16
    iget-object v0, p0, Les/cf;->l:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_0
    return-void
.end method

.method public declared-synchronized a(Ljava/util/List;)V
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    monitor-enter p0

    .line 50
    :try_start_0
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iput-wide v0, p0, Les/cf;->b:J

    .line 51
    iget-object v0, p0, Les/cf;->g:Ljava/util/concurrent/atomic/AtomicInteger;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;->set(I)V

    .line 52
    invoke-direct {p0, p1}, Les/cf;->b(Ljava/util/List;)Ljava/util/List;

    move-result-object p1

    .line 53
    invoke-interface {p1}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 54
    sget-object p1, Les/cf;->o:Ljava/lang/String;

    const-string v0, "fail to prepare for scanning..."

    invoke-static {p1, v0}, Lcom/estrongs/android/util/n;->a(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 55
    monitor-exit p0

    return-void

    .line 56
    :cond_0
    :try_start_1
    iget-object v0, p0, Les/cf;->m:Les/if;

    invoke-virtual {v0}, Les/if;->a()V

    .line 57
    iget-object v0, p0, Les/cf;->m:Les/if;

    invoke-virtual {v0, p1}, Les/if;->a(Ljava/util/List;)V

    .line 58
    iget-object v0, p0, Les/cf;->l:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Les/ef;

    .line 59
    invoke-interface {v2, p1}, Les/ef;->a(Ljava/util/List;)V

    goto :goto_0

    .line 60
    :cond_1
    sget-object p1, Les/cf;->o:Ljava/lang/String;

    const-string v0, "start scan..."

    invoke-static {p1, v0}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 61
    iput-boolean v1, p0, Les/cf;->d:Z

    const/4 p1, 0x1

    .line 62
    iput-boolean p1, p0, Les/cf;->c:Z

    .line 63
    :goto_1
    iget p1, p0, Les/cf;->a:I

    if-ge v1, p1, :cond_2

    .line 64
    iget-object p1, p0, Les/cf;->f:Ljava/util/concurrent/ExecutorService;

    iget-object v0, p0, Les/cf;->n:Ljava/lang/Runnable;

    invoke-interface {p1, v0}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    add-int/lit8 v1, v1, 0x1

    goto :goto_1

    .line 65
    :cond_2
    monitor-exit p0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit p0

    goto :goto_3

    :goto_2
    throw p1

    :goto_3
    goto :goto_2
.end method

.method public declared-synchronized b()V
    .locals 2

    monitor-enter p0

    .line 2
    :try_start_0
    sget-object v0, Les/cf;->o:Ljava/lang/String;

    const-string v1, "\u76ee\u5f55\u5206\u6790\u6b63\u5e38\u7ed3\u675f..."

    invoke-static {v0, v1}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    const/4 v0, 0x0

    .line 3
    iput-boolean v0, p0, Les/cf;->c:Z

    .line 4
    iget-object v0, p0, Les/cf;->e:Ljava/util/concurrent/BlockingQueue;

    invoke-interface {v0}, Ljava/util/concurrent/BlockingQueue;->clear()V

    .line 5
    iget-object v0, p0, Les/cf;->f:Ljava/util/concurrent/ExecutorService;

    invoke-interface {v0}, Ljava/util/concurrent/ExecutorService;->shutdownNow()Ljava/util/List;

    .line 6
    iget-object v0, p0, Les/cf;->l:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Les/ef;

    .line 7
    invoke-interface {v1}, Les/ef;->stop()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    .line 8
    :cond_0
    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0

    goto :goto_2

    :goto_1
    throw v0

    :goto_2
    goto :goto_1
.end method

.method public b(Les/ef;)V
    .locals 1

    if-eqz p1, :cond_0

    .line 9
    iget-object v0, p0, Les/cf;->l:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    :cond_0
    return-void
.end method
